package com.qf.mapper;

import com.qf.entity.TChannel;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/*
杨威
2021/11/6
14:17
*/
public interface ChannelMapper {
    @Select("select * from t_channel")
    List<TChannel> findAll();
    @Insert("insert into t_channel values (0,#{channelName},#{channelType},#{spNumber},#{protocalType})")
    int addChannel(TChannel tChannel);
    @Delete("delete from t_channel where id=#{id}")
    int deleteChannel(Integer id);
    @Update("update t_channel set channelName=#{channelName} and channelType=#{channelType} and spNumber=#{spNumber} and protocalType=#{protocalType}")
    int updateChannel(TChannel tChannel);
    @Select("select * from t_channel where id=#{id}")
    TChannel findById(Integer id);
}
